import QtQuick
import QtQuick.Window


Window {
 
    width: 800
    height: 600
    id: mainLoadWindow

    minimumWidth: 800
    minimumHeight: 600
    maximumWidth: 1600
    maximumHeight: 1200
    flags:Qt.FramelessWindowHint
    visible: true
    title: qsTr("飞鸽")

    Rectangle{
        x:0
        y:0
        height:0
        width:0
        id : mainLoadWindowRect
        objectName: "MainWindowState"
        states: [
            State {
                name: "maxflag_t"
                PropertyChanges {
                    target: mainLoadWindowRect

                }
            },
            State {
                name: "maxflag_f"
                PropertyChanges {
                    target: mainLoadWindowRect
                }
            }
        ]
    }


    MainWindows {
        id: mainWindows
        onCloseWindow: {
            mainLoadWindow.close()
        }
        onShowMiniSize: {
            mainLoadWindow.showMinimized()
        }
        onShowMaxSize:{
          if (mainLoadWindowRect.state == "maxflag_f") {
                mainLoadWindow.showNormal();
                mainLoadWindowRect.state = "minflag_t"

           } else {
               // 恢复到默认状态
                mainLoadWindowRect.state = "maxflag_f"
                mainLoadWindow.showMaximized();
           }
        }
    }


}
